
#ifndef __SYSTASK_H
#define __SYSTASK_H

#include <stdint.h>
#include "dataproc.h"
#include "pulse.h"
#include "rtctime.h"
#include "mytype.h"
#include "iohandle.h"

#ifdef __cplusplus
extern "C"
{
#endif

#ifdef _SYSTASK_MODULE_
#define MY_EXT
#else
#define MY_EXT extern
#endif

	typedef struct
	{
		uint16_t stack_used;
		uint32_t st;
		uint32_t srand[2];
	} sys_info_type;

	typedef struct
	{
		volatile uint32_t u_tick;
		volatile uint32_t powerup_time_cnt;
		volatile uint32_t clks_at_event_rcv;
		sys_info_type info;

		timer_pulse_type pulse;
		sig_time_type sig_time;
		TIME_Type rtc_time;
		float f_cpu_usage;
		short b_coremark;
		uu16 bsp_dly_verify;
	
		io_flt_extv2_type key1,key2,key3,key4;
		
	} sys_run_st_type;

	MY_EXT sys_run_st_type sys_st;

#undef MY_EXT

#ifdef __cplusplus
}
#endif

#endif /* __SYSTASK_H */
